package com.dmap.run.service;

import com.dmap.run.controller.api.param.RunRecordParam;
import com.dmap.run.po.RunRecord;
import com.dmap.run.vo.RunRecordHistoryVo;

import java.util.List;

/**
 * \* User: silent
 * \* Date: 16/05/18 Time: 16:26
 * \* Description:
 * \
 */
public interface RunRecordService {

    boolean insertRunRecord(RunRecordParam param);

    /**
     * @return 存在：true ,不存在： false
     */
    boolean isExistRunRecord(long userId, long startTime, long endTime);

    RunRecordHistoryVo selectRunRecordHistoryList(long userId);

    List<RunRecord> selectRunRecordListByPage(long userId, int pageIndex, int pageSize);

    RunRecord selectRunRecordById(long runRecordId);

    /**
     * 获取用户总公里数 ,单位米
     *
     * @param userId
     * @return
     */
    int selectUserTotalDistance(long userId);

    /**
     * 查询用户在某填的跑步公里数
     * @return
     */
    List<RunRecord> selectUserDistanceByUserIdAndTime(List<Long> userIdList, long startTime,long endTime);


}
